1. Field of the Invention
Embodiments of the present invention generally relate to graphics image generation and, more specifically, to the generation of stereoscopic graphics images.
2. Description of the Related Art
Conventional three-dimensional (3D) graphics processing includes producing stereoscopic image pairs using a fixed function graphics pipeline. A first image of the stereoscopic image pair is generated based on a first viewpoint and a second image of the stereoscopic image pair is generated based on a second viewpoint. FIG. 1 is a conceptual diagram of a prior art stereoscopic image projection in the xz plane in accordance with one or more aspects of the present invention. An object 130 is projected onto an image plane 100 viewed from a first viewpoint 120 corresponding to a viewer's left eye and a second viewpoint 115 corresponding to a viewer's right eye. Points 110 and 105 represent the position of object 130 in image plane 100 for each of the two different viewpoints.
A stereoscopic image pair corresponding to a single monoscopic image may be generated by a fixed function graphics pipeline by changing the viewpoint transformation matrix used to compute vertex positions of an object, such as object 130. Therefore, a graphics application program, such as a computer game program, intended to generate only monoscopic images may be used to generate stereoscopic images without any modification. Specifically, each image is generated twice, using two different viewpoint matrices to generate the stereoscopic image pair. Generation of the stereoscopic image pair is controlled by the graphics processor device driver and does not require any changes to the graphics application program.
With the advent of programmable graphics pipelines that are configured using vertex shader programs, the transformation matrix is not easily changed by the device driver in order to compute different vertex positions for an object. The graphics application program must therefore be designed to include stereoscopic support rather than relying on the device driver for stereoscopic support.
Accordingly, there is a need to configure a graphics processing pipeline to generate stereoscopic images using a vertex shader program, thereby enabling a graphics application program intended for monoscopic image generation to be used to generate stereoscopic image pairs.